﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MovieRental.XmlDataService;
using System.Runtime.Serialization;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace MovieRental.Entities
{
    
    [DataContract]
    [XmlEntity("Customers")]
    public class CustomerInfo : BaseEntity<Guid>
    {
        private string _firstName;
        private string _lastName;
        private string _email;
        private string _phoneNo;

        public CustomerInfo()
        {
            Id = Guid.NewGuid();
        }

        public CustomerInfo(Guid id)
        {
            Id = id;
        }

        [DataMember]
        public string FirstName
        {
            get { return _firstName; }
            set { SetProperty<string>(ref _firstName, value, "FirstName"); }
        }


        [DataMember]
        public string LastName
        {
            get { return _lastName; }
            set { SetProperty<string>(ref _lastName, value, "LastName"); }
        }

        [DataMember]
        public string Email
        {
            get { return _email; }
            set { SetProperty<string>(ref _email, value, "Email"); }
        }

        [DataMember]
        public string PhoneNo
        {
            get { return _phoneNo; }
            set { SetProperty<string>(ref _phoneNo, value, "PhoneNo"); }
        }

    }
}
